package it.orma.iridehr.email.config;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.FactoryBean;

public class EmailParameter implements FactoryBean<Map<String,String>> {

	private String smtpServer;
	private String smtpPort;
	private String smtpPassword;
	private String smtpUsername;
	private String smtpBehalfUser;
	
	private String imapServer;
	private String imapPort;
	private String imapPassword;
	private String imapUsername;

	@Override
	public Map<String,String> getObject() throws Exception {
		Map<String,String> parameters = new HashMap<String,String>();
		parameters.put("smtpServer", smtpServer);
		parameters.put("smtpPort", smtpPort);
		parameters.put("smtpPassword", smtpPassword);
		parameters.put("smtpUsername", smtpUsername);
		parameters.put("smtpBehalfUser", smtpBehalfUser);
		parameters.put("imapServer", imapServer);
		parameters.put("imapPort", imapPort);
		parameters.put("imapPassword", imapPassword);
		parameters.put("imapUsername", imapUsername);
		
		return parameters;
	}

	@Override
	public Class<?> getObjectType() {
		return Map.class;
	}

	@Override
	public boolean isSingleton() {
		
		return true;
	}

	public String getSmtpServer() {
		return smtpServer;
	}

	public void setSmtpServer(String smtpServer) {
		this.smtpServer = smtpServer;
	}

	public String getSmtpPort() {
		return smtpPort;
	}

	public void setSmtpPort(String smtpPort) {
		this.smtpPort = smtpPort;
	}

	public String getSmtpPassword() {
		return smtpPassword;
	}

	public void setSmtpPassword(String smtpPassword) {
		this.smtpPassword = smtpPassword;
	}

	public String getSmtpUsername() {
		return smtpUsername;
	}

	public void setSmtpUsername(String smtpUsername) {
		this.smtpUsername = smtpUsername;
	}

	public String getSmtpBehalfUser() {
		return smtpBehalfUser;
	}

	public void setSmtpBehalfUser(String smtpBehalfUser) {
		this.smtpBehalfUser = smtpBehalfUser;
	}

	public String getImapServer() {
		return imapServer;
	}

	public void setImapServer(String imapServer) {
		this.imapServer = imapServer;
	}

	public String getImapPort() {
		return imapPort;
	}

	public void setImapPort(String imapPort) {
		this.imapPort = imapPort;
	}

	public String getImapPassword() {
		return imapPassword;
	}

	public void setImapPassword(String imapPassword) {
		this.imapPassword = imapPassword;
	}

	public String getImapUsername() {
		return imapUsername;
	}

	public void setImapUsername(String imapUsername) {
		this.imapUsername = imapUsername;
	}

}
